<nz-layout class="layout">
	<!-- JustFresh 2018-11-28 Begin 引入统一顶部导航 -->
	<app-admin-header></app-admin-header>
	<!-- JustFresh 2018-11-28 End 引入统一顶部导航 -->
	<nz-content class="body">
		<!-- JustFresh 2018-11-28 Begin 面包屑导航 -->
		<nz-breadcrumb>
			<nz-breadcrumb-item><a [routerLink]="['/admin/index']" [queryParams]="{module:'index',opt:'index'}">控制台</a></nz-breadcrumb-item>
			<nz-breadcrumb-item><a [routerLink]="['/admin/adv/list']" [queryParams]="{module:'index',opt:'adv'}">广告管理</a></nz-breadcrumb-item>
			<nz-breadcrumb-item>广告添加</nz-breadcrumb-item>
        </nz-breadcrumb>
		<!-- JustFresh 2018-11-28 End 面包屑导航 -->
		<!-- JustFresh 2018-11-28 Begin 页面主体部分 -->
		<nz-layout class="main">
			<!-- JustFresh 2018-11-28 Begin 引入左侧导航菜单 -->
			<nz-sider [nzWidth]="200">
				<app-admin-left-nav class="left-nav"></app-admin-left-nav>
			</nz-sider>
			<!-- JustFresh 2018-11-28 Ends 引入左侧导航菜单 -->
			<nz-content class="content">
				<form class="admin-form">
					<div nz-row nzGutter="24">
						<div class="form-group">
							<input type="text" class="form-ipt" placeholder="请输入广告标题" [(ngModel)]="adv.advName" name="advName" />
						</div>
						<div class="form-group">
							<label>广告图片</label>
							<input type="file" (change)="uploadImg('adv',$event)" name="file" />
							<img *ngIf="adv.thumb" src="{{siteUrl}}{{adv.thumb}}" alt="请上传缩略图" class="thumb" />
						</div>
						<div class="form-group">
							<input type="text" class="form-ipt" placeholder="请输入链接地址" [(ngModel)]="adv.advUrl" name="advUrl" />
						</div>
						<div class="form-group">
							<select name="advType" class="form-select" [(ngModel)]="adv.advType">
								<option *ngFor="let item of typeSelect" [value]="item.key">{{item.value}}</option>
							</select>
						</div>
						<div class="form-group">
							<select name="positionId" class="form-select" [(ngModel)]="adv.positionId">
								<option *ngFor="let item of positionSelect" [value]="item.key">{{item.value}}</option>
							</select>
						</div>
						<div class="form-group">
							<input type="number" class="form-ipt" placeholder="请输入排序" [(ngModel)]="adv.reorder" name="reorder" />
						</div>
						<div class="form-group">
							<select name="isBlank" class="form-select" [(ngModel)]="adv.isBlank">
								<option *ngFor="let item of isBlankSelect" [value]="item.key">{{item.value}}</option>
							</select>
						</div>
						<div class="form-group">
							<select name="status" class="form-select" [(ngModel)]="adv.status">
								<option *ngFor="let item of statusSelect" [value]="item.key">{{item.value}}</option>
							</select>
						</div>
						<div class="form-group">
							<button nz-button="" (click)="sendForm()" nztype="primary" class="ant-btn ant-btn-primary">
								提交
							</button>
							<button (click)="goBack()" nz-button="" nztype="default" class="ant-btn ant-btn-default">
								返回上一步
							</button>
						</div>
					</div>
				</form>
			</nz-content>
		</nz-layout>
		<!-- JustFresh 2018-11-28 End 页面主体部分 -->
		<!-- JustFresh 2018-11-28 Begin 引入统一底部导航 -->
		<app-admin-footer></app-admin-footer>
		<!-- JustFresh 2018-11-28 End 引入统一底部导航 -->
	</nz-content>
</nz-layout>